﻿using DirectSell.Model.Money;
using DirectSell.Model.Query;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Webdiyer.WebControls.Mvc;

namespace Direct.IDAL.Manager.Money
{
    public interface IVirtualMoneyAuditRepository:IBaseManagerRepository
    {
        /// <summary>
        /// 查电子币申请记录
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<PagedList<VirtualMoney>> GetRecord(BaseCondition condition);
        /// <summary>
        /// 修改审核状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="hstable"></param>
        void UpdateState(int id, int state, ref Hashtable hstable);
        /// <summary>
        /// 增加电子币
        /// </summary>
        /// <param name="usercode"></param>
        /// <param name="id"></param>
        /// <param name="hstable"></param>
        void AddMoney(string usercode, int id, ref Hashtable hstable);
        /// <summary>
        /// 查询金额
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<decimal> QueryAmount(int id);
        /// <summary>
        /// 减少电子币
        /// </summary>
        /// <param name="usercode"></param>
        /// <param name="id"></param>
        /// <param name="hstable"></param>
        void ReduceMoney(string usercode, int id, ref Hashtable hstable);
        /// <summary>
        /// 查询类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> QueryType(int id);
    }
}
